<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html version="-//W3C//DTD XHTML 1.1//EN"
      xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.w3.org/1999/xhtml
                          http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd"
>
	<head>
	
	    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	    <style type="text/css">@import url(/register/register.css);</style>
		
		<title>Register</title>	
		
        <script type="text/javascript" src="/code/jquery-1.7.min.js"></script>  
        <script type="text/javascript" src="/register/register.js"></script>  
        <script type="text/javascript" src="/code/jquery.preload.js"></script>

        <!-- Add fancyBox -->
        <link rel="stylesheet" href="/fancybox/jquery.fancybox.css?v=2.0.1" type="text/css" media="screen" />
        <script type="text/javascript" src="/fancybox/jquery.fancybox.pack.js?v=2.0.1"></script>

	</head>

	<body>
		
		<div id="page" class="coolBorder">	
			<div id="header" >
                
                <div id="SignOut" class=" logo " >
                
                        Bulletin Board
                    
			    </div>
            </div>
			<div id="Content" >
		        <div class="middle" >
                <div class="titlebig">Create a New Account</div>
                <p>Use the form below to create a new account.</p>

                <div>
                 <form action="/register" id="register" method="post">
	        	   

				   <%
						var name="";
						var username="";
						var picture="";
						var password="";
						if(request.parameters){
						var name=request.parameters["name"];
						var username=request.parameters["username"];
						var picture=request.parameters["picture"];
						var password=request.parameters["password"];
				   
						if(name==undefined){
							name="";
						}
						if(username==undefined){
							username="";
						}if(picture==undefined){
							picture="";
						}if(password==undefined){
							password="";
						}
						}

				   %>

                 <fieldset>
                         <legend>New Account</legend>
                             <div class="editor-label">
                                <label for="name">full name</label>
                             </div>
                             <div class="editor-field">
                                 <input class="text-box single-line"  id="name" name="name" type="text" value="<%response.body+=name; %>">
                             </div>
   
                               <div class="editor-label">
                                 <label for="username">username</label>
                               </div>
                               <div class="editor-field">
                                 <input class="text-box single-line " id="username" name="username" type="text" value="<% response.body+=username; %>">
                               </div>
                            
                                  
                             <div class="editor-label">
                          <label for="password">password</label>
                             </div>
                             <div class="editor-field">
                                <input class="text-box single-line password"  id="password" name="password" type="password" value="<% response.body+=password; %>">
                             </div>
                               <div class="editor-label">
                                 <label for="picture">picture</label>
                             </div>
                             <div class="editor-field">
                                <input class="text-box single-line " id="picture" name="picture" type="text" value="<% response.body+=picture; %>">
                             </div>

							 <input type="hidden" name="precheck" value="false">
             
                
               <p>
               <input type="submit" value="Register">
           </p>
          
               <div id="userNameIMGs" class="inline">
                        <img id="errorImg" class="infoIMG" src="../images/error.png" alt="error"/>   
                        <img id="goodImg" class="infoIMG" src="../images/Ok.png" alt="error"/>  
                        <span id="userNMmsg"></span> 
               </div>   
                           

       </fieldset>
			   
			     </form>
				 <%
					var messages=request.getAttribute("errorMsgs");
					if(messages!==undefined){
					
						response.body+='<div class="validation-summary-errors">';
					    response.body+='<span>Account creation was unsuccessful. Please correct the errors and try again.</span>';
					    response.body+='<ul>';
						for(var i=0;i<messages.length;i++){
							response.body+="<li>"+messages[i]+"</li>";
						}
								
						response.body+='<ul>';
                    
						response.body+='</div>';
					}
				%>
             </div>
               </div>

			</div>

			<div id="Footer" >
			
				<div id="copyright">
						Powered by Baruch and Shimi 2012
					
					
				</div>
			</div>
	    </div>
	</body>
	
	>
	
	
</html>